package generator.domain;

import java.util.Date;

/**
 * 
 * @TableName audit_logs
 */
public class AuditLogs {
    /**
     * 
     */
    private Long id;

    /**
     * 
     */
    private Integer actorId;

    /**
     * 
     */
    private String action;

    /**
     * 
     */
    private String resource;

    /**
     * 
     */
    private Integer resourceId;

    /**
     * 
     */
    private Object details;

    /**
     * 
     */
    private Date createdAt;

    /**
     * 
     */
    public Long getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 
     */
    public Integer getActorId() {
        return actorId;
    }

    /**
     * 
     */
    public void setActorId(Integer actorId) {
        this.actorId = actorId;
    }

    /**
     * 
     */
    public String getAction() {
        return action;
    }

    /**
     * 
     */
    public void setAction(String action) {
        this.action = action;
    }

    /**
     * 
     */
    public String getResource() {
        return resource;
    }

    /**
     * 
     */
    public void setResource(String resource) {
        this.resource = resource;
    }

    /**
     * 
     */
    public Integer getResourceId() {
        return resourceId;
    }

    /**
     * 
     */
    public void setResourceId(Integer resourceId) {
        this.resourceId = resourceId;
    }

    /**
     * 
     */
    public Object getDetails() {
        return details;
    }

    /**
     * 
     */
    public void setDetails(Object details) {
        this.details = details;
    }

    /**
     * 
     */
    public Date getCreatedAt() {
        return createdAt;
    }

    /**
     * 
     */
    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AuditLogs other = (AuditLogs) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getActorId() == null ? other.getActorId() == null : this.getActorId().equals(other.getActorId()))
            && (this.getAction() == null ? other.getAction() == null : this.getAction().equals(other.getAction()))
            && (this.getResource() == null ? other.getResource() == null : this.getResource().equals(other.getResource()))
            && (this.getResourceId() == null ? other.getResourceId() == null : this.getResourceId().equals(other.getResourceId()))
            && (this.getDetails() == null ? other.getDetails() == null : this.getDetails().equals(other.getDetails()))
            && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getActorId() == null) ? 0 : getActorId().hashCode());
        result = prime * result + ((getAction() == null) ? 0 : getAction().hashCode());
        result = prime * result + ((getResource() == null) ? 0 : getResource().hashCode());
        result = prime * result + ((getResourceId() == null) ? 0 : getResourceId().hashCode());
        result = prime * result + ((getDetails() == null) ? 0 : getDetails().hashCode());
        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", actorId=").append(actorId);
        sb.append(", action=").append(action);
        sb.append(", resource=").append(resource);
        sb.append(", resourceId=").append(resourceId);
        sb.append(", details=").append(details);
        sb.append(", createdAt=").append(createdAt);
        sb.append("]");
        return sb.toString();
    }
}